package com.ssy.lingxi.logistics.service;

import com.ssy.lingxi.common.model.dto.UserLoginCacheDTO;
import com.ssy.lingxi.common.model.vo.PageVO;
import com.ssy.lingxi.common.response.PageData;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.logistics.api.dto.request.CommonIdRequest;
import com.ssy.lingxi.logistics.model.request.ReceiverAddressAddRequest;
import com.ssy.lingxi.logistics.model.request.ReceiverAddressUpdateRequest;
import com.ssy.lingxi.logistics.model.response.ReceiverAddressListResponse;
import com.ssy.lingxi.logistics.model.response.ReceiverAddressResponse;
import com.ssy.lingxi.logistics.model.response.web.WebReceiverAddressListResponse;

import java.util.List;

/**
 * 收货地址服务类
 *
 * @author yzc
 * @version 2.0.0
 * @date 2020/7/13
 */
public interface IReceiverAddressService {

    /**
     * 收货地址分页列表
     * @param request 接口参数
     * @param loginUser 登录用户信息
     * @return 返回结果
     */
    Wrapper<PageData<ReceiverAddressListResponse>> pageReceiverAddress(PageVO request, UserLoginCacheDTO loginUser);

    /**
     * 收货地址查询
     * @param id 主键id
     * @return 返回结果
     */
    Wrapper<ReceiverAddressResponse> getReceiverAddress(Long id);

    /**
     * 收货地址添加
     * @param request 接口参数
     * @param loginUser 登录用户信息
     * @return 返回结果
     */
    Wrapper<ReceiverAddressResponse> addReceiverAddress(ReceiverAddressAddRequest request, UserLoginCacheDTO loginUser);

    /**
     * 收货地址修改
     * @param request 接口参数
     * @param loginUser 登录用户信息
     */
    Wrapper<Void> updateReceiverAddress(ReceiverAddressUpdateRequest request, UserLoginCacheDTO loginUser);

    /**
     * 收货地址删除
     * @param request 接口参数
     * @param loginUser 登录用户信息
     * @return 返回结果
     */
    Wrapper<Void> deleteReceiverAddress(CommonIdRequest request, UserLoginCacheDTO loginUser);


    /**
     * 收货地址列表(默认地址首位)
     * @return 返回结果
     */
    Wrapper<List<WebReceiverAddressListResponse>> listReceiverAddressDefault(UserLoginCacheDTO sysUser);
}
